package com.todo.strategy.online.infrastructure.repository;


import com.todo.strategy.online.infrastructure.entity.domain.MemoUserRelationDO;

/**
 * @author azhebuxing
 * @date 2024/11/29 00:08
 * @description
 */
public interface MemoUserRelationRepository {

    /**
     * 新增计划备忘录关联
     *
     * @param memoUserRelationDO
     * @return
     */
    boolean insertMemoUserRelation(MemoUserRelationDO memoUserRelationDO);

    /**
     * 根据主键查询计划备忘录关联
     *
     * @param id
     * @return
     */
    MemoUserRelationDO queryMemoUserRelationById(Long id);

    /**
     * 根据用户Id和计划Id查询计划备忘录关联
     *
     * @param userId
     * @param planId
     * @return
     */
    MemoUserRelationDO queryMemoUserRelationByUserIdAndPlanId(Long userId, Long planId);

    /**
     * 根据主键更新计划备忘录关联
     *
     * @param memoUserRelationDO
     * @return
     */
    boolean updateMemoUserRelationById(MemoUserRelationDO memoUserRelationDO);

    /**
     * 根据用户Id和计划Id删除计划备忘录关联
     *
     * @param userId
     * @param planId
     * @return
     */
    boolean removeMemoUserRelationByUserIdAndPlanId(Long userId, Long planId);

    /**
     * 根据主键删除计划备忘录关联
     *
     * @param id
     * @return
     */
    boolean removeMemoUserRelationById(Long id);
}
